import request from '@/utils/request';
    
interface DetailParamsType {
    companyId: number;
}

interface AddParamsType {
  companyName: string;
  companyDesc: string;
}

export async function queryCompany(): Promise<any> {
  return request('/api/company');
}

export async function queryCompanyDetail(params: DetailParamsType): Promise<any> {
  return request('/api/company/detail', { params });
}

export async function addCompany(params: AddParamsType): Promise<any> {
  return request.post('/api/company', { data: params });
}

export async function delCompany(params: DetailParamsType): Promise<any> {
  return request.delete('/api/company', { params });
}